Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrections for Xlsx Read Comments #2329

Merged
merged 2 commits into from
Oct 24, 2021
Merged

Conversation

oleibman
Copy link
Collaborator

This change was suggested by issue #2316. There was a problem reading Xlsx comments which appeared with release 18.0 but which was already fixed in master. So no source change was needed to fix the issue, but I thought we should at least add the test case to our unit tests.

In developing that case, I discovered that, although comment text was read correctly, there was a problem with comment author. In fact, there were two problems. One was new, with the namespacing changes - as in several other cases, the namespaced attribute authorId needed some special handling. However, another problem was much older - the code was checking !empty($comment['authorId']), eliminating consideration of authorId=0, and should instead have been checking isset. Both problems are now fixed, and tested.

This is:

- [x] a bugfix
- [ ] a new feature

Checklist:

Why this change is needed?

This change was suggested by issue PHPOffice#2316. There was a problem reading Xlsx comments which appeared with release 18.0 but which was already fixed in master. So no source change was needed to fix the issue, but I thought we should at least add the test case to our unit tests.

In developing that case, I discovered that, although comment text was read correctly, there was a problem with comment author. In fact, there were two problems. One was new, with the namespacing changes - as in several other cases, the namespaced attribute `authorId` needed some special handling. However, another problem was much older - the code was checking `!empty($comment['authorId'])`, eliminating consideration of authorId=0, and should instead have been checking `isset`. Both problems are now fixed, and tested.
@oleibman oleibman merged commit 9512f54 into PHPOffice:master Oct 24, 2021
@oleibman oleibman deleted the issue2316 branch November 26, 2021 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant